package org.sjs.dreamfly.model.toutiao

import org.sjs.dreamfly.model.VideoInfo

data class Data(
    var `abstract`: String?,
    var author: Author?,
    var content: String?,
    var create_time: Int?,
    var feed_type: Int?,
    var group_source: Int?,
    var id: String?,
    var image_list: List<Image?>?,
    var modify_time: Int?,
    var publish_time: Int?,
    var recall_source: String?,
    var stats: Stats?,
    var title: String?,
    var url: String?,
    var video: Video?
) {
    fun toVideoInfo(): VideoInfo {
        return VideoInfo(
            videoUrl = "",
            title = this.title,
            refer = this.url,
            nextRefer = null,
            prevRefer = null,
            nextVideoUrl = null,
            movieId = null,
            sid = 1,
            nid = 1,
            encrypt = 0,
            imageUrl = video?.cover_image_url,
            parent = null)
    }
}